/* 
 * @file lua.h
 * @author Matthew P. Del Buono
 * @date August 30, 2009, 12:05 PM
 *
 * Standard include file for Lua support
 */
/*
    This file is part of Starfish.

    Starfish is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Starfish is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Starfish.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _LUA_H
#define	_LUA_H

// Lua is included static or dynamic... handle correctly
#if defined(STATIC_LUA) && defined(DYNAMIC_LUA)
#   error STATIC_LUA and DYNAMIC_LUA are mutually exclusive
#elif defined(STATIC_LUA)

// Wrap Lua in extern "C" if necessary
#   ifdef __cplusplus
        extern "C"
        {
#   endif // defined __cplusplus

#   include "lua/luaconf.h"
#   include "lua/lua.h"
#   include "lua/lualib.h"
#   include "lua/lauxlib.h"

#   ifdef __cplusplus
        }
#   endif // defined __cplusplus

#elif defined(DYNAMIC_LUA)

// Wrap Lua in extern "C"
#   ifdef __cplusplus
        extern "C"
        {
#   endif // defined __cplusplus

#   include <lua.h>
#   include <lualib.h>
#   include <lauxlib.h>

#   ifdef __cplusplus
        }
#   endif // defined __cplusplus
#else
#   error Either STATIC_LUA or DYNAMIC_LUA must be defined
#endif


#endif	/* _LUA_H */

